package com.liip.platform.controller;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.liip.platform.common.ReturnT;
import com.liip.platform.service.LoginService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;


/**
* 登录注册相关
* @author 罗林
* @date 2020/03/07
*/
@Api(tags = { "登录注册相关接口" })
@RestController
@RequestMapping(value = "/Login")
public class LoginController {
	
	@Resource
	private LoginService loginService;
	/**
     * [查询] 根据用户名loginName 查询
     * @author 罗林
     * @date 2020/03/06
     **/
	@ApiOperation(value = "根据用户名查询用户", notes = "")
	@ApiImplicitParams({
		@ApiImplicitParam(name = "loginName", value = "用户名", required = true),
		@ApiImplicitParam(name = "passWord", value = "密码")
	})
    @RequestMapping("/login")
	public ReturnT<String> login(String loginName, String passWord) {
		return loginService.login(loginName, passWord);
	}
}
